// page/member/bankcar.js
Page({

  /**
   * 页面的初始数据
   */
  data: {

  },

  onShow: function () {
    var app = getApp()
    var that = this;
    var uid = wx.getStorageSync('uid');
    
    // var idcard = that.data.idcard.substring(a.length - 4);
    // spstr = idcard.split("");
    // var bankfor = spstr[spstr.length-4]; 
    // var bankfor = idcard.substring(a.length - 4);  
    
    // console.log(uid)
    wx.request({
      url: app.globalData.host + '&g=App&m=User&a=my_card',
      data: { uid: uid },
      header: {
        'content-type': 'application/json'
      },
      success: function (res) {
        console.log(res.data)
        // var bankCard = res.data.list[9].bankCard;
        // var bankfor = that.data.bankCard.substr(-4)
        // console.log(res.data.list[9].bankCard)
        // console.log(that.data.bankfor)
        that.setData({
          list:res.data.list,
          idcard: res.data.idCard
        })
      }
    })
    that.setData({
      bankfor: that.data.bankfor
    })
  }
})